// 2025/09/22
// Author: Forever
#include <bits/stdc++.h>
using namespace std;

int n;
double f, x, xx, p[100005];

signed main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    cin >> n;
    for (int i = 1; i <= n; i++)
        cin >> p[i];
    for (int i = 1; i <= n; i++) {
        f = (f + 3 * xx + 3 * x + 1) * p[i] + f * (1 - p[i]);
        xx = (xx + 2 * x + 1) * p[i];
        x = (x + 1) * p[i];
    }
    cout << fixed << setprecision(1) << f << endl;
    return 0;
}